<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    
    <div class="form-group">
        <label for="c-nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-nickname" disabled data-rule="required" class="form-control" name="row[nickname]" type="text" value="{$row.nickname|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-mobile" disabled data-rule="" class="form-control" name="row[mobile]" type="text" value="{$row.mobile|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Max_house_state')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="houseStateList" item="vo"}
            <label for="row[max_house_state]-{$key}"><input disabled id="row[extension][max_house_state]-{$key}" name="row[max_house_state]" type="radio" value="{$key}" {in name="key" value="$row.max_house_state"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Broker_user_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-broker_user_id" disabled data-rule="required" data-source="xiluhouse/user/user/index" data-field="nickname" class="form-control selectpage" name="row[extension][broker_user_id]" type="text" value="{$row.broker_user_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('House_state')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="houseStateList" item="vo"}
            <label for="row[house_state]-{$key}"><input disabled id="row[house_state]-{$key}" name="row[extension][house_state]" type="radio" value="{$key}" {in name="key" value="$row.house_state"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label for="c-assets_condition" class="control-label col-xs-12 col-sm-2">{:__('assets_condition')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-assets_condition" data-rule="" class="form-control" name="row[extension][assets_condition]" type="text" value="{$row.assets_condition|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('prefer_json')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="row[prefer_json]" data-template="prefer_jsontpl">
                <dd>
                    <ins>名称</ins>
                    <ins>值</ins>
                </dd>
                <dd>
                <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[prefer_json]" class="form-control hide" cols="50" rows="5">{$row.prefer_json|htmlentities}</textarea>
            </dl>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" class="form-control" name="row[extension][weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script type="text/html" id="prefer_jsontpl">
    <dd class="form-inline">
        <input type="text" name="row[<%=name%>][<%=index%>][name]" class="form-control" value="<%=row['name']%>" size="10">
        <input type="text" name="row[<%=value%>][<%=index%>][value]" class="form-control" value="<%=row['value']%>" size="10">
        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
    </dd>
</script>
